package org.studle.utilities;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Validator {
	public Pattern emailPattern = Pattern.compile("[a-zA-Z]{1}[a-zA-Z0-9\u002E\u005F]+@([a-zA-Z]+\u002E){1,2}((net)|(com)|(org))");
    public Pattern passwordPattern = Pattern.compile("[\\w\\@\\#\\$\\%\\^\\&\\*\\(\\)\\.\\?\\!]{6,18}");

	public static boolean validate(Pattern pattern, String string) {
		Matcher matcher = pattern.matcher(string);
		return matcher.matches();
	}

}

